package com.joker.orange.domain.bo;

import com.joker.common.core.domain.BaseEntity;
import com.joker.common.core.validate.AddGroup;
import com.joker.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.math.BigDecimal;

/**
 * 购买订单业务对象 t_buy_order
 *
 * @author Joker
 * @date 2024-07-08
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class BuyOrderBo extends BaseEntity {

    /**
     * 唯一标识
     */
    @NotNull(message = "唯一标识不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 用户ID
     */
    @NotNull(message = "用户ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long userId;

    /**
     * 商品ID
     */
    @NotNull(message = "商品ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long productId;

    /**
     * 商品名称
     */
    @NotBlank(message = "商品名称不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productName;

    /**
     * 商品封面
     */
    @NotBlank(message = "商品封面不能为空", groups = { AddGroup.class, EditGroup.class })
    private String productCover;

    /**
     * 订单编号
     */
    @NotBlank(message = "订单编号不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderNo;

    /**
     * 订单金额
     */
    @NotNull(message = "订单金额不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal orderAmount;

    /**
     * 订单状态（0-待支付、1-已支付、2-支付失败）
     */
    @NotBlank(message = "订单状态（0-待支付、1-已支付、2-支付失败）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderStatus;

    /**
     * 订单类型（0-网格视频、1-短视频、2-小说、3-漫画、4-动漫）
     */
    @NotBlank(message = "订单类型（0-网格视频、1-短视频、2-小说、3-漫画、4-动漫）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String orderType;

    /**
     * 备注
     */
    @NotBlank(message = "备注不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;


}
